<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head> 
   <meta charset="UTF-8">
   <%@ include file="/WEB-INF/views/include/head.jsp"%>
   <link rel="stylesheet" href="${ctxStatic}/css/common_erp.css">
   <link rel="stylesheet" href="${ctxStatic}/css/layerSm.css">
   <script src="${ctxStatic}/js/jquery-1.9.1.min.js"></script>
   <script src="${ctxStatic}/js/layer.js"></script>
   <script src="${ctxStatic}/js/style.js"></script>
   <script src="${ctxStatic}/jquery-barcode/jquery-barcode.js" type="text/javascript"></script>
   <script type="text/javascript">   
	$(document).ready(function(){		
		$("#inventoryRequestBarCodeDiv").empty().barcode($("#ostockBarCode").val(), "code128",{barWidth:2, barHeight:30,showHRI:false});
	});
	</script>
</head>
<body>
<div class="layerHeader clearfix">
	<p class="headerTitle"><spring:message code="SlopworkOutrequest_show_head" /></p>
    <div class="headerButton clearfix">
        <!-- 编辑 -->
        <button type="button" onClick="window.location.href='${ctx}/slopwork/outrequest/form?id=${slopworkOutrequest.id}'"><spring:message code="write_style_btn"/></button>
        <!-- 取消 -->
        <button onclick="closeWin()"><spring:message code="btn_cancle"/></button>
    </div>
</div>
<form id="inputForm" method="post">
<input type="hidden" id="id" name="id" value="${slopworkOutrequest.id}"/>
<input type="hidden" id="ostockBarCode" name="ostockBarCode" value="${slopworkOutrequest.ostockBarCode}">
    <c:set value="<%=ResourcesUtil.getConfig(\"clothes_out_category_samply\")%>" var="varClothesOutSamply" />
    <c:set value="<%=ResourcesUtil.getConfig(\"clothes_out_category_order\")%>" var="varClothesOutOrder" />
<div class="smOrderBox">
    <div class="items clearfix">
        <div class="col-33 clearfix" id="divInventoryRequestNo">
            <!-- 出库单号 -->
            <p class="tit"><spring:message code="SlopworkOutrequest_show_inventoryRequestNo" /></p>
            <p>${slopworkOutrequest.outboundRequestNo}</p>
        </div>
        <div class="col-66 clearfix">
            <div class="col-33 clearfix">
                <!-- 出库类别 -->
                <p class="tit"><spring:message code="SlopworkOutrequest_show_inventoryCategory" /></p>
                <p>${fns:getDictName(slopworkOutrequest.outboundCategory)}</p>
            </div>
        </div>      
    </div>
    <div class="items clearfix">
        <c:choose>
            <c:when test="${slopworkOutrequest.outboundCategory eq varClothesOutSamply}">
                <div class="col-33 clearfix" id="divContractProcessId">
                    <!-- 样品需求订单  -->
                    <p class="tit" style="width:75px;"><spring:message code="customer_styleNo_choose" /></p>
                    <p>${slopworkOutrequest.customerContractNo}</p>
                </div>
            </c:when>
            <c:otherwise>
                <div class="col-33 clearfix">
            <!-- 合同编号 -->
            <p class="tit" style="width:75px;"><spring:message code="SlopworkOutrequest_show_order" /></p>
            <p>${slopworkOutrequest.contractNo}</p>
        </div>
            </c:otherwise>
        </c:choose>
            <div class="col-33 clearfix" id="divStyleId">
                <!-- 款式 -->
                <p class="tit"><spring:message code="SlopworkOutrequest_show_style" /></p>
                <p>${slopworkOutrequest.ocustomerStyleNo}</p>
            </div>
    </div>
    </div>
</div>
<div class="tableArea">
    <div class="tableScrollSm" style="overflow:auto;width:875px;height:420px;">
        <table cellpadding="0" class="tableHead">
            <thead>
            <tr>
                <!-- 客户订单号 -->
                <th><p class="width-250px"><spring:message code="SlopworkOutrequest_show_list_customerContractNo" /></p></th>
                <!-- 颜色-->
                <th><p class="width-120px"><spring:message code="SlopworkOutrequest_show_list_color" /></p></th>
                <!-- 尺码 -->
                <th><p class="width-120px"><spring:message code="SlopworkOutrequest_show_list_size" /></p></th>
                <!-- 订单数量 -->
                <th><p class="width-120px"><spring:message code="SlopworkOutrequest_show_list_indentQuantity" /></p></th>
                <!-- 库存数量 -->
                <th><p class="width-120px"><spring:message code="slopworkInRequest_show_list_quantity" /></p></th>
                <!-- 出库数量-->
                <th><p class="width-120px"><spring:message code="SlopworkOutrequest_show_list_requestQuantity" /></p></th>
            </tr>
            </thead>
        </table>
        <table cellpadding="0" class="tableBody" id="tableRequestDetails">
        <c:if test="${not empty slopworkOutrequest.requestOutDetailsList}">
            <tbody>
            <c:forEach items="${slopworkOutrequest.requestOutDetailsList}" var="OutrequestDetailsInfo" varStatus="status">
            <tr>
                <!-- 客户订单号 -->
                <td><p class="width-250px">${OutrequestDetailsInfo.customerContractNo}</p></td>
                <!-- 颜色-->
                <td><p class="width-120px">${OutrequestDetailsInfo.styleColor}</p></td>
                <!-- 尺码 -->
                <td><p class="width-120px">${fns:getDictName(OutrequestDetailsInfo.styleSize)}</p></td>
                <!-- 订单数量 -->
                <td><p class="width-120px"><fmt:formatNumber value="${OutrequestDetailsInfo.oindentQuantity}" pattern="#,##0"/></p></td>
                <!-- 库存数量 -->
                <td><p class="width-120px"><fmt:formatNumber value="${OutrequestDetailsInfo.clothsQuantity}" pattern="#,##0"/></p></td>
                <!-- 出库数量-->
                <td><p class="width-120px"><fmt:formatNumber value="${OutrequestDetailsInfo.requestOutQuantity}" pattern="#,##0.###"/></p></td>
            </tr>
            </c:forEach>
            </tbody>
        </c:if>    
        </table>
    </div>
</div>
</form>
</body>
</html>